package day012.homework.p2;

public class Company implements Money {
    private double money;

    public Company() {

    }

    public Company(double money) {
        this.money = money;
    }

    public double getMoney() {
        return money;
    }

    public void setMoney(double money) {
        this.money = money;
    }

    @Override
    public void pay(Employee e) {
        money -= e.getSalary();
        System.out.println("给员工：" + e.getName() + "发工资：" + e.getSalary() + "元" +
                "，公司剩余资金：" + money + "元");
    }
}
